-- GENERATED SPELL FOR [Mosshide Mystic] --


function spell0_1013(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_1013', 3000, 1)
end

function spell1_1013(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1013', 3000, 1)
end

function spell2_1013(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1013', 10000, 1)
end

function Sorts_1013(pUnit, Event)
local choix_sorts_1013 = math.random(0, 2)
if choix_sorts_1013 == 0 then
pUnit:RegisterEvent('spell0_1013', 1, 1)
end
if choix_sorts_1013 == 1 then
pUnit:RegisterEvent('spell1_1013', 1, 1)
end
if choix_sorts_1013 == 2 then
pUnit:RegisterEvent('spell2_1013', 1, 1)
end
end

function mob1013_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1013', math.random(1500, 3000), 1)
end

function mob1013_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1013_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1013_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1013, 1, 'mob1013_Action')
RegisterUnitEvent(1013, 2, 'mob1013_Leave')
RegisterUnitEvent(1013, 3, 'mob1013_Kill')
RegisterUnitEvent(1013, 4, 'mob1013_Die')
